Skip to content

[mono][aot] Enabling AOT wrappers for virtual delegates - #85643

Merged
LeVladIonescu merged 21 commits into
dotnet:mainfrom
LeVladIonescu:AOT_delegates
May 22, 2023
Merged

[mono][aot] Enabling AOT wrappers for virtual delegates#85643
LeVladIonescu merged 21 commits into
dotnet:mainfrom
LeVladIonescu:AOT_delegates

Conversation

@LeVladIonescu

@LeVladIonescu LeVladIonescu commented May 2, 2023

Copy link
Copy Markdown
Contributor

Adding AOT wrappers for delegate invoke virtual.
Contributes to #83329.

Vlad - Alexandru Ionescu added 5 commits April 26, 2023 20:31
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu LeVladIonescu added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 2, 2023
@ghost ghost assigned LeVladIonescu May 2, 2023
@ghost ghost added the area-Codegen-AOT-mono label May 2, 2023
Comment thread src/mono/mono/mini/aot-compiler.c Outdated
MonoJumpInfoToken *ji;
guint8 *p = buf;

printf("NAME = %s\n", method->name);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change...only for debug reasons

Comment thread src/mono/mono/mini/aot-compiler.c
Comment thread src/mono/mono/mini/aot-runtime.c
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu LeVladIonescu changed the title [DRAFT] Enabling AOT wrappers for virtual delegates [mono][aot] Enabling AOT wrappers for virtual delegates May 10, 2023
@LeVladIonescu LeVladIonescu removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 10, 2023
LeVladIonescu and others added 3 commits May 11, 2023 10:05
@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

Ready to review / merge.
Library tests build failures from CI are related.

@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@SamMonoRT

Copy link
Copy Markdown
Member

@LeVladIonescu - as part of this PR consider enabling any disabled tests fixed by the changes.

@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

@SamMonoRT will check

Comment thread src/mono/mono/metadata/metadata.c Outdated
shared_context = mono_class_get_generic_container (method->klass)->context;
inst = shared_context.class_inst;

args = g_new0 (MonoType*, inst->type_argc);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the memory being deallocated correctly?

@LeVladIonescu LeVladIonescu May 16, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is not. I would suggest deallocating it after

memcpy (ginst->type_argv, type_argv, type_argc * sizeof (MonoType *));

^ @vargaz

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can be freed, but the aot compiler is already leaking memory in a number of places, so its not that important.

…d indentation

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

LeVladIonescu and others added 2 commits May 19, 2023 00:26
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@LeVladIonescu

Copy link
Copy Markdown
Contributor Author

Remaining failures are known and unrelated.

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
@LeVladIonescu
LeVladIonescu merged commit e91db04 into dotnet:main May 22, 2023
@LeVladIonescu
LeVladIonescu deleted the AOT_delegates branch May 22, 2023 10:35
@ghost ghost locked as resolved and limited conversation to collaborators Jun 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants